package com.itheima.controller;

import java.util.Arrays;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/*@Controller
@ResponseBody*/

/**
 * Controller
 * @author Johnny.Chen
 *
 */
@RestController
@ConfigurationProperties(prefix="person")
public class HelloController2 {
	
	private String name;
	private int age;
	private String[] addr;
	
	public String[] getAddr() {
		return addr;
	}
	public void setAddr(String[] addr) {
		this.addr = addr;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}


	//@RequestMapping(value="/sayHello",method=RequestMethod.GET)
	@GetMapping("/sayhello2")
	public String sayHello() {
		return name+" 真的好骚啊！===>"+age+"====>"+Arrays.toString(addr);
	}

}
